{% extends '::layout.html.twig' %}    

{% block js %}
<script type="text/javascript" src="{{ asset('js/jquery.validate.js') }}"></script>
<script type="text/javascript" src="{{ asset('bundles/lettraluser/js/jquery.register.js') }}"></script>
{% endblock %}

{% block title %}Créer un compte{% endblock %}

{% block content %}
	<br />
    <div class="error_summary">{{ form_errors(form) }}</div>
    <div class="form" id="register_block">   
	    <form id="lettral_user_register" action="{{ path('fos_user_registration_register') }}" {{ form_enctype(form) }} novalidate="novalidate" class="top" method="POST">
	        <div class="left_part">
		        <fieldset class="small">
		        	<p>Ces informations serviront à vous connecter à votre compte.<br />Tous les champs sont obligatoires.</p>
		        	<div id='errors'></div>
		            <legend>Informations du compte</legend>
		            {{ form_label(form.username) }} <span class="error"></span> {{ form_widget(form.username) }} 
		            {{ form_label(form.email) }} <span class="error"></span> {{ form_widget(form.email) }} 
		            {{ form_widget(form.plainPassword) }} <span class="error"></span> {{ form_errors(form.plainPassword) }}
		        </fieldset>
		        {{ form_rest(form) }}
	        </div>
		</form>
		<div class='clr'></div><br />
		<button class="validate">Créer</button>	  
	</div>

{% endblock %}